package sample;

import java.io.IOException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLStreamHandler;

public class MyURLHandler extends URLStreamHandler
{

    @Override
    protected URLConnection openConnection(URL url) throws IOException
    {
        return new MyURLConnection(url);
    }
//    public static void main(String[] args) throws IOException {
//        URL.setURLStreamHandlerFactory(new MyURLStreamHandlerFactory());
//        URL url=new URL("myapp://C:/Users/94080/Desktop/OneTab.html");
//        MyURLConnection con=new MyURLConnection(url);
//        con.loadImage();
//
//    }

}